import { RouteRecordRaw, createRouter, createWebHashHistory } from 'vue-router';
import IndexView from './views/index-view.vue';
import LoginView from './views/login-view.vue';
// import WriteTokenView from './views/write-toekn-view.vue';

export const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'home',
    component: IndexView,
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView,
  },
  // {
  //   path: '/login',
  //   name: 'login',
  //   component: WriteTokenView,
  // },
  {
    path: '/**',
    redirect: '/',
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
